#include "selectcollect.h"
#include "ui_selectcollect.h"

selectcollect::selectcollect(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::selectcollect)
{
    ui->setupUi(this);
    ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    this->setWindowFlags(Qt::FramelessWindowHint);
}

selectcollect::~selectcollect()
{
    delete ui;
}

void selectcollect::addselectitem(QListWidgetItem *li, selectcollectitem *si)
{
    ui->listWidget->addItem(li);
    // ui->listWidget->setItemWidget(li,si);
}

void selectcollect::on_pushButton_clicked()
{
    close();
}


void selectcollect::on_listWidget_currentRowChanged(int currentRow)
{
    QString collectname=ui->listWidget->item(currentRow)->text();
    this->collectname=collectname;
}


void selectcollect::on_pushButton_2_clicked()
{
    if(!this->collectname.isEmpty())
    emit addonevideotocollect(this->collectname);
    close();
}

